package com.ruoyi.common.core.Entity;


import com.ruoyi.common.core.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;

/*
    订单实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Orders {

    @Excel(name = "订单ID")
    private long order_id; //订单ID
    @Excel(name = "订单所属的用户ID")
    private long order_user_id; //订单所属的用户ID
    @Excel(name = "订单所属商家ID")
    private long store_id; //订单所属商家ID
    @Excel(name = "订单所属的商品ID")
    private long goods_id; //订单所属的商品ID（与优惠券ID二选一）
    @Excel(name = "订单所属的优惠券ID")
    private long coupons_id; //订单所属的优惠券ID（与优惠券ID二选一）
    @Excel(name = "购买的商品数量")
    private int number; //购买的商品数量
    @Excel(name = "订单状态（已付款、已发货、已完成、已取消）")
    private String order_status; //订单状态（已付款、已发货、已完成、已取消）
    @Excel(name = "收货人姓名")
    private String consignee_name; //收货人姓名
    @Excel(name = "收货人电话")
    private String consignee_phone; //收货人电话
    @Excel(name = "收货人地址")
    private String consignee_address; //收货人地址
    @Excel(name = "配送方式")
    private String deliver_type; //配送方式
    @Excel(name = "下单时间")
    private Timestamp order_time; //下单时间
    @Excel(name = "配送时间")
    private Timestamp deliver_time; //配送时间
    private boolean del_flag; //删除标志（ 0未删除，1已删除）

    private Map<String,Object> params; //请求参数

    public Map<String, Object> getParams() {
        if (params == null) {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }
}
